<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>WorkPort</title>
    <link rel="stylesheet" type="text/css" href="../lib/kendo/styles/kendo.common-bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="../lib/kendo/styles/kendo.bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="../css/style.css">
    <link rel="stylesheet" type="text/css" href="../css/layout.css">
    <script src="../lib/kendo/js/jquery.min.js"></script>
    <script src="../lib/kendo/js/kendo.all.min.js"></script>
    <script src="../lib/kendo/js/jquery.transit.min.js"></script>
    <script src="../lib/jquery.slimscroll.min.js"></script>
    <script src="../js/svs.framework.js"></script>
    <script src="../js/wp.js"></script>
    <script src="../js/want.api.js"></script>
</head>

<body>
    <script type="text/javascript">
    function getHome(){
    	Workport.WantAPI.homeApps(function(data){
    		$('#result').get(0).innerText += (new Date() + ":" + JSON.stringify(data) + "\n");
    	},{offset:10,count:10,mode:"Limited",filterBy:"date",orderBy:"date"});
    }
    function getAll(){
    	Workport.WantAPI.allApps(function(data){    		
    		$('#result').get(0).innerText += (new Date() + ":" + JSON.stringify(data) + "\n");
    	},{offset:10,count:10,mode:"Limited",filterBy:"date",orderBy:"date"});
    }
    function searchHome(){
    	Workport.WantAPI.searchHomeApp(function(data){
    		$('#result').get(0).innerText += (new Date() + ":" + JSON.stringify(data) + "\n");
    	},{offset:"",count:10,key:"App",mode:"Contains"},{});
    }
    function searchAll(){
    	Workport.WantAPI.searchApp(function(data){
    		$('#result').get(0).innerText += (new Date() + ":" + JSON.stringify(data) + "\n");
    	},{offset:"",count:10,key:"App",mode:"Contains"},{});
    }
    function add(){
    	Workport.WantAPI.addFavourite(function(data){
    		$('#result').get(0).innerText += (new Date() + ":" + JSON.stringify(data) + "\n");
    	},{appId:100});
    }
    function getTab(){
    	Workport.WantAPI.getTabs(function(data){
    		$('#result').get(0).innerText += (new Date() + ":" + JSON.stringify(data) + "\n");
    	},{appId:100});
    }
    function clearLog(){
    	$('#result').get(0).innerText = "";
    }
    </script>
    
</body>
	<input type = "button" onclick = "clearLog()" value="Clear"></br>
	<input type = "button" onclick = "getHome()" value="Home">
	<input type = "button" onclick = "getAll()" value="All">
	<input type = "button" onclick = "searchHome()" value="Search Home">
	<input type = "button" onclick = "searchAll()" value="Search All">
	<input type = "button" onclick = "add()" value="Add">
	<input type = "button" onclick = "getTab()" value="Tab">
	</br>
	
	<div id="result" style="margin: 0px;"></div>
	
</html>